<%@ page language="java" import="java.util.*" pageEncoding="utf-8"  isELIgnored ="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="/WEB-INF/taglib.jsp" %>
<%@ include file="/WEB-INF/jsp/loading.jsp" %>
<%
    String path = request.getContextPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title>人员相关信息</title>
    <%@ include file="/WEB-INF/jsp/include.jsp" %>
    <%--<script type="text/javascript" src="<%=path%>/resource/js/system/jquery.form.js"></script>--%>
    <script type="text/javascript">
        var path = "<%=path%>";
        var params = new Object();
        var url = path + "/system/userlog/listUserInfo";
        $(function () {
            //设置AjaxLoading
            setAjaxLoading();
            var grid = $("#tt");
            initGrid(grid);
        });
        //初始化表格和数据
        function initGrid(grid) {
            var columns = [
                {field: "id", title: "ID", hidden: true, align: "left", sortable: false, resizable: true, width: 120},
                {
                    field: "userCode",
                    title: "用户账号",
                    align: "left",
                    halign: "center",
                    sortable: false,
                    resizable: true,
                    width: 130
                },
                {
                    field: "userName",
                    title: "用户名称",
                    align: "left",
                    halign: "center",
                    sortable: false,
                    resizable: true,
                    width: 135
                },
                {
                    field: "code",
                    title: "机构代码",
                    align: "left",
                    halign: "center",
                    sortable: false,
                    resizable: true,
                    width: 150
                },
                {
                    field: "name",
                    title: "机构名称",
                    align: "left",
                    halign: "center",
                    sortable: false,
                    resizable: true,
                    width: 150
                },
                {
                    field: "roleName",
                    title: "角色名称",
                    align: "left",
                    halign: "center",
                    sortable: false,
                    resizable: true,
                    width: 190
                }
            ];
            initPageGrid(grid, params, url, columns);
            btnQuery();
        }
        //查询按钮
        function btnQuery() {
            var grid = $("#tt");
            params.userName = $('#userName').val();
            params.roleCode = $('#roleNameQuery').combobox("getValue");
            getPage(grid, params, url);
        }
    </script>
</head>
<body style="margin:0px; padding:0px;">
<div class="easyui-layout" fit="true">
    <div id="divNorth" region="north" title="查询条件" border="true" noheader="false"
         style="padding: 5px; height: 71px; background: none repeat scroll 0 0 #EFEFEF;">
        <table>
            <tr>
                <td>用户名称：</td>
                <td><input class="query_input" type="text" id="userName" name="userName" style="width: 200px"/></td>
                <td>角色名称：</td>
                <td>
                    <select id="roleNameQuery" name="roleNameQuery" class="easyui-combobox" data-options="panelWidth:220"
                            style="width: 160px;">
                        <option value=""></option>
                        <c:forEach var="roleDto" items="${roleDtoList}">
                            <option value="${roleDto.roleCode }">${roleDto.roleName }</option>
                        </c:forEach>
                    </select>
                </td>
                <td><input class="search-btn-blue" style="margin-left:10px" type="button" onclick="btnQuery();"
                           value="查询"></td>
            </tr>
        </table>
    </div>
    <div region="center" style="padding: 5px;" border="false">
        <div class="easyui-layout" fit="true" border="false">
            <div region="center" title="" border="false" noheader="true"
                 style="padding: 5px 0 0 0;">
                <table id="tt" title="" border="false"></table>
            </div>
        </div>
    </div>
</div>
</body>
</html>
